//仓库数据  逻辑处理
import handler from './index'
let reducer = (state = { ...handler.state }, action: { type: string, value: any }) => {
    let newStore = JSON.parse(JSON.stringify(state))
    for (let key in handler.actionsNums) {
        if (key === handler.actionsNums[key]) {
            handler.actions[handler.actionsNums[key]](newStore, action)
            break
        }
    }
    return newStore
}
export default reducer